<%@ page pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<% 
	String id = request.getParameter("id");
	String targetLanguage = request.getParameter("target");
	String tb = request.getParameter("tb");
	org.languageguide.readings.PublishedReading reading = new org.languageguide.readings.PublishedReading(id, targetLanguage);
%>
<title><%= reading.getTitle() %></title>
<link href="/readings/styles/docs.css" rel="stylesheet" type="text/css">
<% if (tb == null){ %>
	<script language="javascript" src="/applets/ir_new.js"></script>
<% }else{ %>
	<script language="javascript" src="/applets/ir_new_mobile.js"></script>
<% } %>
<script type="text/javascript">
	var id = <%= id %>;
	<% if (reading.hasWordGranularity()){ %>
		var hasWordGranularity = true;
	<% } else{ %>
		var hasWordGranularity = false;
	<% } %>
	var times = new Array(<%= reading.getTimes() %>);
</script>
</head>
<body onLoad="loaded()" onkeydown="keyListener(event)">
<div id="modalPage">
<%= reading.getText() %>
</div>
</body>
</html>